diff options
| author | Kyren223 <Kyren223@proton.me> | 2024-11-12 16:05:53 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2024-11-12 16:05:53 +0200 |
| commit | 0c17d94c4d1303d73b3ad3e7a9dfef1fb8f0a883 (patch) | |
| tree | 7a005aedbb5795779a56799fc8e2353a1b126a7a /src/pages/blogs/[...slug].astro | |
| parent | 56e79f187c71eaadca5ae0a1e717793175c04671 (diff) | |
Backup
Diffstat (limited to 'src/pages/blogs/[...slug].astro')
| -rw-r--r-- | src/pages/blogs/[...slug].astro | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/pages/blogs/[...slug].astro b/src/pages/blogs/[...slug].astro new file mode 100644 index 0000000..417d1a6 --- /dev/null +++ b/src/pages/blogs/[...slug].astro @@ -0,0 +1,32 @@ +--- +import Markdown from "../../components/MarkdownB.astro"; +import { getCollection } from "astro:content"; + +export async function getStaticPaths() { + const blogEntries = await getCollection("blogs"); + return blogEntries.map((entry) => ({ + params: { slug: entry.slug }, + props: { entry }, + })); +} + +const { entry } = Astro.props; +const { Content } = await entry.render(); +--- + +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="description" content="Astro description" /> + <meta name="viewport" content="width=device-width" /> + <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> + <meta name="generator" content={Astro.generator} /> + <title>Test</title> + </head> + <body> + <main> + <Markdown><Content /></Markdown> + </main> + </body> +</html> |
